<template>
  <div class="app-container">
    <!--账单管理-发票管理-->
    <div class="top">
      <h5 class="title">发票管理</h5>
      <div class="nav">
        <div class="nav-left">
          <span>关键字：</span>
          <el-input
            style="width: 200px;height: 36px;margin-right: 10px;"
            placeholder="搜诊所/代理商名称、诊所/机构联系人、诊所/机构电话"
            suffix-icon="el-icon-search"
          >
          </el-input>
        </div>
        <div>
          <el-button type="primary" round style="width: 120px;height: 36px">新增发票</el-button>
          <el-button type="primary" round style="width: 120px;height: 36px">删除发票</el-button>
        </div>
      </div>

    </div>
    <div class="bottom">
      <el-table ref="table" :data="tableData" size="small" style="width: 100%;">
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="blocId" width="159" label="诊所/机构名称"></el-table-column>
        <el-table-column prop="blocId" width="159" label="发票类型"></el-table-column>
        <el-table-column prop="blocId" width="159" label="发票项目"></el-table-column>
        <el-table-column prop="blocId" width="159" label="公司名称"></el-table-column>
        <el-table-column prop="blocId" width="159" label="纳税人识别号"></el-table-column>
        <el-table-column prop="blocId" width="159" label="邮寄接收人"></el-table-column>
        <el-table-column prop="blocId" width="159" label="邮箱"></el-table-column>
        <el-table-column prop="blocAdmin" width="135" label="操作">
          <template slot-scope="scope">
            <a style="color: #719DC9;text-decoration:underline" @click="edit(scope)">编辑</a>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <!-- 修改发票信息 -->
    <el-dialog
      title="修改发票信息"
      :visible.sync="dialogVisible"
      width="80%"
      :before-close="handleClose">
      <div>修改发票信息</div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      btnStr: ['创建门诊', '编辑门诊', '规则配置', '暂停合作', '导出诊所'],
      iptStyle: [
        {
          str: '搜诊所/代理商名称、诊所/机构联系人、诊所/机构电话',
          icon: 'el-icon-search'
        },
        {
          str: '所属区域',
          icon: 'el-icon-arrow-down'
        },
        {
          str: '所属销售',
          icon: 'el-icon-arrow-down'
        },
        {
          str: '诊所名称',
          icon: 'el-icon-arrow-down'
        },
        {
          str: '发票类型',
          icon: 'el-icon-arrow-down'
        }
      ],
      tableData: [{
        blocId: 'LM4401DL190816200101',
        blocClinicName: '北京美中宜和门诊',
        clinicNature: '民营',
        blocAdmin: '管理员',
        billAdmin: '账单管理员',
        sign: '已签',
        deadline: '2019.09.09',
        packageRules: '',
        ProductRules: ''
      }, {
        blocId: 'LM4401DL190816200101',
        blocClinicName: '北京美中宜和门诊',
        clinicNature: '民营',
        blocAdmin: '管理员',
        billAdmin: '账单管理员',
        sign: '已签',
        deadline: '2019.09.09',
        packageRules: '',
        ProductRules: ''
      }],
      dialogVisible: false,
      invoiceInfo: {}
    };
  },
  methods: {
    blocDetail(row) {
      this.$router.push('details');
    },
    // 修改发票信息
    edit(info) {
      console.log(info)
      this.dialogVisible = true
      this.invoiceInfo = info
    },
  }
};
</script>

<style scoped>
    .top .title {
        margin: 0 0 20px;
        font-size: 30px;
        color: #02a7f0;
    }

    .nav {
        margin-top: 10px;
        display: flex;
        justify-content: space-between;
    }

    .text {
        font-size: 18px;
        font-weight: bold;
        color: #333;
    }

    .bottom {
        margin-top: 10px;
    }
</style>
